Skip to content

Render hierarchical types as a tree - #1867

Open
PaulHax wants to merge 5 commits into
Kitware:mainfrom
PaulHax:hierarchical-type-list
Open

Render hierarchical types as a tree#1867
PaulHax wants to merge 5 commits into
Kitware:mainfrom
PaulHax:hierarchical-type-list

Conversation

@PaulHax

@PaulHax PaulHax commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

Render hierarchical types as a tree

Bryon called out three follow-ups during review of the original hierarchy PR:
render the Type List as a tree, let a parent toggle its children, and roll child counts into
parents. For datasets without a type hierarchy, the Type List retains its existing flat behavior.

Screenshot 2026-08-21 160322
dive-type-hierarchical-list.mp4

Changes

  • Indent descendants and add branch disclosure controls.
  • Give parent checkboxes checked, unchecked, and indeterminate states; toggling a parent applies to
    its complete subtree.
  • Keep ancestor paths visible during search and sort siblings within each branch.
  • Compact a shared unused leading lineage behind Expand Parents and Compact Parents.
  • Roll descendant totals and current-frame counts into their parents.
  • Make parent maximum-count navigation include descendants and use the same selected-camera and
    suppression rules as the displayed counts.
  • Keep structural parents visible with Show Empty off, without showing disclosure controls for
    children that are filtered out.

Manual tests

Test data: upload and extract
hierarchical-type-list.zip
The ZIP opens to hierarchical-type-list/ with self-contained synthetic/ and sefsc/ datasets.

Type List controls and counts

  1. Create a 1 FPS image-sequence dataset from synthetic/images/, then import
    synthetic/annotations.json and synthetic/config.json.
  2. Exercise branch collapse, parent checkboxes, search, Show Empty, all three sort modes, and
    Expand Parents / Compact Parents.
  3. Compare counts at frames 0, 2, and 4, then use the fish maximum-count button.
  4. Set the suppression region type to fish; uncheck and recheck juvenile-red-snapper and
    red-snapper.

Verify: The tree and tri-state checkboxes follow the hierarchy, search keeps the ancestor path, and
the compact breadcrumb is eukaryota › animalia › chordata. Parent counts include descendants;
fish totals four tracks and seeks to frame 2. Suppressed detections do not reappear in parent
counts or peak navigation.

Real SEFSC-SEAMAP hierarchy

  1. Create a 5 FPS video dataset from the MP4 in sefsc/, then import its VIAME CSV and
    configuration from the same directory.
  2. Search, collapse branches, and sort the Type List.

Verify: The 24 real tracks render in the correct hierarchy from eukaryota through the eight
observed species.

This is a follow-up to
Define raw and resolved classification boundaries.

@PaulHax
PaulHax marked this pull request as ready for review August 21, 2026 20:12
@PaulHax
PaulHax force-pushed the hierarchical-type-list branch 4 times, most recently from 76947a4 to e79e363 Compare August 21, 2026 20:47

@BryonLewis BryonLewis left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is good as is, below is a list of other things I found while reviewing this PR. They can be broken out into future PR updates:

  • Afterwards lets update the behavior on filter-by-frame and the header checkbox toggling on/off all types. It should probably only toggle the current types that are visible on the page. This was an existing issue I just noticed while testing this PR. When filter-by-frame is on it shows only the types for that frame, but the header checkbox toggle will toggle on/off all frames. This is unexpected because if you use the search modifier it only toggles the types that the search displays in the list.
  • I think we need to do some CSS modifications or maybe some options to reduce the amount of space taken up in the type list. Currently between the tree structure, the total:frame counts and filter/ other buttons it is getting a little crowded. Below are some options
    • reduce the offset for the tree indentation if possible
    • The space between the chevron and the checkbox can be reduced a bit
    • Make it so Total Count: Frame Count are toggle-able individually in the settings. I.E you can have both on, you can one or the other
  • Type Settings update
    • Deletion of hierarchy/parent types, I don't think they can be removed right now
    • Ability to add your own hierarchy from the interface. We add the lowest level types but it may be nice to edit the types in a hierarchical way at some point and create the hierarchies.
  • Option for cascading up types. Somewhere in the settings I think if you turn off a leaf on the tree it should automatically move the type up the branch to the one that is visible. This can be a setting that can be set by the user depending on what they want to see.

@mattdawkins

Copy link
Copy Markdown
Member

If it's easy, it might be nice to have a left oriented bar to show the hierarchy better, something like:

image

@BryonLewis

Copy link
Copy Markdown
Collaborator

It isn't, we are using Vuetify 2 and their system, We can save that sort of thing for a future update if we want to write a bunch of custom code to support this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants